package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.nursing.service.UserNursingProjectService;
import com.zzyl.nursing.vo.Page;
import com.zzyl.serve.domain.NursingProject;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/member/orders/project")
public class UserNursingProjectController extends BaseController {
    @Autowired
    private UserNursingProjectService userNursingProjectService;

    @GetMapping("/page")
    public Page page(@Param("name")String name, @Param("pageNum")Integer pageNum, @Param("pageSize")Integer pageSize, @Param("status")Integer status){
        // 开启分页
        startPage();
        List<NursingProject> pageResult = userNursingProjectService.page(name,pageNum,pageSize,status);
        return new Page(pageResult.size(),pageResult, 200, "查询成功");
    }
}
